<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">
    <title>vue helloworld</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <style>
        h4{
            width: 600px;
            text-align: center;
            padding: 5px;
            margin: 6px;
        }
        .red{
            background-color: #f00;
        }
    </style>
</head>
<body>
<div id="app">
    <h3>{{ message }}[{{version}}]</h3>
    <h4 v-for="(item,index) in 5" :class="item%2==0 ? 'red' : ''">item={{item}},index={{index}}</h4>
</div>
<script>
    const {createApp, ref, version} = Vue
    createApp({
        setup() {
            const message = ref('Hello vue!')
            return {
                message,
                version
            }
        }
    }).mount('#app')
</script>
</body>
</html>


